The invention relates generally to the field of computer systems and more particularly to systems that employ disk storage based upon a redundant array of independent disks (RAID) implementation.
A computer system includes an operating system whose primary function is the management of hardware and software resources in the computer system. The operating system handles input/output (I/O) requests from software processes or applications to exchange data with on-line external storage devices in a storage subsystem. The operating system (such as Windows NT(copyright) available from Microsoft, Corp. of Redmond, Wa.) forwards I/O requests to an I/O subsystem, which, in turn, converts the logical addresses into physical locations in the storage devices and commands the latter devices to engage in the requested storage or retrieval operations.
The on-line storage devices on a computer are configured from one or more disks into logical units of storage space referred to herein as xe2x80x9ccontainers.xe2x80x9d Examples of containers include volume sets, stripe sets, mirror sets, and various Redundant Array of Independent Disk (RAID) implementations. A volume set comprises one or more physical partitions, i.e., collections of blocks of contiguous space on disks, and is composed of space on one or more disks. Data is stored in a volume set by filling all of the volume""s partitions in one disk drive before using volume partitions in another disk drive. A stripe set is a series of partitions on multiple disks, one partition per disk, that is combined into a single logical volume. Data stored in a stripe set is evenly distributed among the disk drives in the stripe set. In its basic configuration, a stripe set is also known as a xe2x80x9cRAID 0xe2x80x9d configuration. A mirror set is composed of volumes on multiple disks, whereby a volume on one disk is a duplicate copy of an equal sized volume on another disk in order to provide data redundancy. A basic configuration for a mirror set is known as xe2x80x9cRAID 1.xe2x80x9d There is often a desire to increase data reliability in a stripe set by using parity distributed across storage blocks with respect to each stripe. Where such parity is provided to the stripe set, the configuration is known as xe2x80x9cRAID 5.xe2x80x9d In an even more complex implementation, where stripe sets are mirrored on a plurality of containersxe2x80x94and redundant data is distributed across the stripes, the resulting configuration is known as xe2x80x9cRAID 10.xe2x80x9d Generally speaking, all configurations of the RAID implementation (RAID 0-10) provide a collection of partitions, where each partition is composed of space from one disk in order to support data redundancy.
V-When a RAID 5 container is initially created (preconfigured) within a disk array, there are generally two setup optionsxe2x80x94either the container is xe2x80x9cscrubbedxe2x80x9d by generating all parity in combination with the currently resident data; or the container is zeroed by writing successive zeroes across the container storage space. In general, the clearance of a container is accomplished by allocating a sufficiently large amount on-line memory space, initializing the memory space with zeroes via the host CPU/processor, and then writing the stored zeroes into the disk container as one or more blocks. Clearly, each successive write entails a number of steps that occupies significant bus and processor overhead, especially where the overall disk space may occupy 100 gigabytes or more. In addition the speed is limited by overall processor and bus transmission speeds.
It is, therefore, an object of this invention to provide a system and method for zeroing a disk storage space that is more efficient and quicker than conventional zeroing techniques, using minimal processor and bus overhead. This technique should enable selective zeroing of RAID containers during computer processor runtime with minimum demands on the associated data bus.
This invention overcomes the disadvantages of the prior art by providing a system and method for enabling a disk arranged as a RAID to be zeroed/cleared largely independent of runtime intervention by the main computer processor and with reduced bus overhead. In a preferred embodiment, the system and method provides the writing of a series of logical zeros to each disk in the container using an internal bus driver-level command. The command causes a small data block of all zeroes written to the disk to be duplicated so that the entire container space in each disk is effectively written-to. The bus driver is preferably a small computer system interface (SCSI) architecture that support a WRITE SAME command. Where the disk device fails to support the WRITE SAME command then an alternative process is employed, in which a single large sized memory block is created and initialized with all zeroes. A predetermined number of virtual scatter gather elements are created, each pointing to the memory block. The data in these scatter gather elements is written to the unsupported device so as to clear the entire container space of that device using a smaller block than the overall space requires for complete clearance.